home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 021a / pull_dwg.zip / PULL_DWG.LSP < prev    next >
Lisp/Scheme  |  1991-09-05  |  2KB  |  69 lines

  1.  
  2. ; Note: You may edit this lisp file to rename the following functions
  3. ; to any name of your liking so long as it does not conflict with an
  4. ; AutoCAD internal command (unless you undefine it in S::STARTUP).
  5.  
  6. ; Execute Pull_DWG from within AutoCAD (in shell mode)
  7.  
  8. (defun c:pull ()          ; you can rename pull to anything you like
  9.   (setvar "cmdecho" 0)            ; don't echo commands
  10.   (command "pull_dwg" ". shell")  ; invoke pull_dwg in current subdir
  11.   (graphscr)                      ; flip to graphics screen
  12.   (command "script" "pull_dwg")   ; run the script
  13.   (princ)
  14. )
  15.  
  16. (defun pulshel (mode)              ; call Pull_DWG in shell mode
  17.   (setvar "cmdecho" 0)                    ; don't echo commands
  18.   (command "pull_dwg" (strcat ". " mode)) ; invoke pull_dwg
  19.   (graphscr)                  ; flip to graphics screen
  20.   (command "script" "pull_dwg")           ; run the script
  21.   (princ)
  22. )
  23.  
  24. ; Insert Mode
  25. (defun c:ins ()  (pulshel "insert"))
  26.  
  27. ; Lisp Mode
  28. (defun c:lisp ()  (pulshel "lisp"))
  29.  
  30. ; DXFIN Mode
  31. (defun c:dxf ()  (pulshel "dxfin"))
  32.  
  33. ; DXBIN Mode
  34. (defun c:dxb ()  (pulshel "dxbin"))
  35.  
  36. ; VSlide Mode
  37. (defun c:vs ()  (pulshel "vslide"))
  38.  
  39. ; Redefine the QUIT command to run quit.scr in order to
  40. ; bypass the AutoCAD opening menu.
  41.  
  42. (defun c:quit ()
  43.   (setvar "cmdecho" 0)
  44.   (if
  45.     (= (strcase (getstring
  46.      "\nReally want to discard all changes to drawing (Y/N):")) "Y")
  47.     (command "script" "quit")           
  48.   ) ; end if
  49.   (princ)
  50. )
  51.  
  52. ; Redefine the END command to run end.scr in order to
  53. ; bypass the AutoCAD opening menu.
  54.  
  55. (defun c:end ()
  56.   (setvar "cmdecho" 0)
  57.   (command "script" "end")              ; run end.scr which bypasses menu
  58.   (princ)
  59. )
  60.  
  61. (defun c:wend ()
  62.   (setvar "cmdecho" 0)
  63.   (command "script" "wend")              ; run wend.scr which saves drawing
  64.   (princ)                 ; using wblock * and bypasses menu
  65. )
  66. (princ "\n\n\nPull_DWG loaded...")
  67. (princ)
  68.  
  69.